import QtQuick 2.2
import QtQuick.Window 2.1

Window {
    visible: true
    width: 360
    height: 360

    //Item本身不可见，Item可以对其他元素进行分组
    //Rectangle等继承自Item，

    Rectangle {
        x: 10;
        y: 12.5;
        width: 150;
        height: 100;
        color: "green"
        opacity: 0.8;
        z: 0.1;
    }

    Rectangle {
        x: 50;
        y: 50;
        width: 150;
        height: 150;
        color: "skyblue";
        opacity: 0.7;
        z: 1;
    }

    Rectangle {
        x: 200;
        y: 20;
        width: 50;
        height: 50;
        color: "skyblue";
        clip: true;

        Rectangle {
            x: 10;
            y: 10;
            width: 50;
            height: 50;
            opacity: 0.8;
            color: "pink";
        }
    }

    Rectangle {
        x: 200;
        y: 100;
        width: 50;
        height: 50;
        color: "skyblue";
        clip: false;

        Rectangle {
            x: 10;
            y: 10;
            width: 50;
            height: 50;
            opacity: 0.7;
            color: "pink";
        }
    }
}
